package com.mybatis.lo;

import com.mybatis.lo.dao.UserDao;
import com.mybatis.lo.dao.UserDaoImplWithJdbc;
import com.mybatis.lo.po.User;

import org.junit.Test;

import java.util.List;

/**
 * 第一版本，老师提供的jdbc纯手写实现版本
 */
public class UserDaoTestWithJdbc {


    @Test
    public void testQueryUserById() {
        UserDao userDao = new UserDaoImplWithJdbc();
        User user = userDao.queryUserById(2);
        System.out.println(user);

    }

    @Test
    public void testQueryUsersByUsername() {
        UserDao userDao = new UserDaoImplWithJdbc();

        List<User> users = userDao.queryUserByName("王五");
        System.out.println(users);

    }

}
